import { get, post, put, del } from './request.js';

// 登录
export function login (data) {
    return post('/administration/login', data);
}

// 学生预约报名列表
export function appointmentSignupList (params) {
    return get('/student/appointmentSignup/list', params);
}

// 修改密码
export function updatePassword (data) {
    return put('/school/zx-school-account/updatePassword', data);
}

// 查询班级列表
export function technicalSchoolList (data) {
    return get('/technicalSchoolClass/technicalSchool/list', data);
}

// 学校新增开设班级
export function schoolClassOpen (data) {
    return post('/technicalSchoolClass/schoolClass/open', data);
}

// 学校关闭开设班级
export function schoolClassClose (data) {
    return post('/technicalSchoolClass/schoolClass/close', data);
}

// 学校更新录取分数
export function schoolClassUpdateScore (data) {
    return post('/technicalSchoolClass/schoolClass/updateScore', data);
}

// 学校详情
export function schoolInfo (data) {
    return get('/system/zx-school/info', data);
}

// 更新学校属性值
export function updateField (data) {
    return put('/system/zx-school/updateField', data);
}

// 生成学校id
export function genSchool () {
    return post('/system/zx-school/gen');
}

// 新增学校
export function polymerize (data) {
    return post('/system/zx-school/polymerize', data);
}

// 查询学校指标详情
export function schoolIndexDetail (data) {
    return get('/system/zx-school-index/info/' + data, {});
}

// 新增学校指标
export function addSchoolIndex (data) {
    return post('/system/zx-school-index/save', data);
}

// 查询学校相册详情
export function schoolAlbumDetail (data) {
    return get('/system/zx-school-album/info/' + data, {});
}

// 查询学校视频详情
export function schoolVideoDetail (data) {
    return get('/system/zx-school-video/info/' + data, {});
}

// 新增学校相册
export function addSchoolAlbum (data) {
    return post('/system/zx-school-album/save', data);
}

// 新增学校视频
export function addSchoolVideo (data) {
    return post('/system/zx-school-video/save', data);
}

// 学校视频列表
export function listSchoolVideo (data) {
    return get('/system/zx-school-video/paging', data);
}

// 删除学校视频
export function delSchoolVideo (id) {
    return post('/system/zx-school-video/remove/' + id, {});
}

// 查询学校标签列表
export function listSchoolLabel (data) {
    return get('/system/zx-school-label/paging', data);
}

// 新增学校标签
export function addSchoolLabel (data) {
    return post('/system/zx-school-label/save', data);
}

// 查询学校专业详情
export function schoolMajorHgDetail (data) {
    return get('/system/zx-school-major/infoHg/' + data, {});
}

// 新增学校专业
export function addSchoolMajor (data) {
    return post('/system/zx-school-major/save', data);
}

// 查询参数列表
export function configInfo (data) {
    return get('/system/zx-config/info', { configType: data });
}

// 查询学校用户列表
export function listSchoolAccount (data) {
    return get('/system/zx-school-account/paging', data);
}

// 新增学校用户
export function addSchoolAccount (data) {
    return post('/system/zx-school-account/save', data);
}

// 重置学校账号
export function resetSchoolAccount (data) {
    return post('/system/zx-school-account/reset', data);
}

// 查询学校资质详情
export function schoolQualificationsDetail (data) {
    return get('/system/zx-school-qualifications/info/' + data, {});
}

// 新增学校资质
export function addSchoolQualifications (data) {
    return post('/system/zx-school-qualifications/save', data);
}

// 查询学校VR详情
export function schoolVrDetail (data) {
    return get('/system/zx-school-vr/info/' + data, {});
}

// 新增学校VR
export function addSchoolVr (data) {
    return post('/system/zx-school-vr/save', data);
}

// 查询录取分数线
export function selectListBySchoolId (id) {
    return get('/system/zx-school/scoreLine/' + id, {});
}

// 新增录取分数线
export function addScoreLine (data) {
    return post('/system/zx-school/scoreLine', data);
}

// 更新录取分数线
export function updateScoreLine (data) {
    return put('/system/zx-school/scoreLine', data);
}

// 删除录取分数线
export function deleteScoreLine (id) {
    return post('/system/zx-school/scoreLine/' + id, {});
}

// 查询学校补贴列表
export function listSchoolSubsidy (data) {
    return get('/system/zx-school-subsidy/paging', data);
}

// 新增学校补贴
export function addSchoolSubsidy (data) {
    return post('/system/zx-school-subsidy/save', data);
}

// 删除学校补贴
export function delSchoolSubsidy (id) {
    return post('/system/zx-school-subsidy/remove/' + idd, {});
}


// 获取专业列表
export function getSchoolCustomMajorList (data) {
    return get('/school-custom-major/list', data);
}

// 添加专业
export function addSchoolCustomMajor (data) {
    return post('/school-custom-major/add', data);
}

// 更新专业
export function updateSchoolCustomMajor (data) {
    return put('/school-custom-major/update', data);
}

// 删除专业
export function delSchoolCustomMajor (id) {
    return del('/school-custom-major/delete/' + id, {});
}


// 获取评论列表（分页）
export function getSchoolComments (query) {
    return get('/schoolComment/list', query);
}

// 根据评论ID获取评论详情
export function getSchoolCommentById (id) {
    return get(`/schoolComment/${id}`, {});
}

// 添加评论
export function addSchoolComment (commentData) {
    return post('/schoolComment/add', commentData);
}

// 更新评论
export function updateSchoolComment (commentData) {
    return put('/schoolComment/update', commentData);
}

// 删除评论
export function deleteSchoolComment (id) {
    return del(`/schoolComment/delete/${id}`, {});
}
